package cn.dlc.com;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * @author 邓立川
 * @date 2020/12/30 14:00
 * @desc 添加当前类的描述信息
 */
@SpringBootApplication
// 启动nacos的服务发现
@EnableDiscoveryClient
@EnableFeignClients
public class ConsumerServerApplication {

    @Bean
    @LoadBalanced
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }

    public static void main(String[] args) {
        SpringApplication.run(ConsumerServerApplication.class,args);
    }
}
